package com.shihang.blog.mapper;

import com.shihang.blog.bean.Article;
import com.shihang.blog.config.PageConfig;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface ArticleMapper {
    //查询全部
    List<Article> queryArticles();

    //根据条件查询列表
    List<Article> queryArticlesByParams(Map<String,Object> params);

    Article findArticleById(Integer id);

    List<Article> searchArticle(String content);

    List<Article> queryArticleByPage(PageConfig pageConfig);

    Integer saveArticle(Article article);
    //
    void updateArticle(Article article);

    void deleteArticle(Article article);


}
